package com.abl.common.util;

/**
 * 扩展方法
 */
interface Check {
    boolean check(Object val);

    String defaultErrorMessage();
}

/**
 * 正则
 */
public enum Regular implements Check {
    SUCCESS_200("200", "操作成功", "描述信息"),
    RE_SUBMIT_600("600", "重复提交", "描述信息");

    private final String expression;
    private final String defaultErrorMessage;
    private final String des;

    Regular(String expression, String defaultErrorMessage, String des) {
        this.expression = expression;
        this.defaultErrorMessage = defaultErrorMessage;
        this.des = des;
    }

    @Override
    public boolean check(Object val) {
        return false;
    }

    @Override
    public String defaultErrorMessage() {
        return null;
    }
}
